package main.visitor;

public class ExpressVisitor implements Visitor {

    @Override
    public long visit(Book book) {

	return book.getUnitPrice() * book.getDiscount() * book.getPaperQuality() * (book.getPaperCount() - 2);
    }

    @Override
    public long visit(Pencil pencil) {
	return pencil.getUnitPrice() * pencil.getDiscount() * pencil.getBoldQuality() * (pencil.getLength() - 2);
    }

}
